<?PHP
  class menueselector extends Control{
    public $style = '';
	
	public function getCode(){
	  $res = "<select name=\"".$this->name."\" style=\"".$this->style."\">";
	  foreach(sys::getMenues() as $menue){
		if($menue->id == $this->value){
		  $res .= "<option value=\"".$menue->id."\" selected=\"1\">".$menue->name."</option>";
		}
	    else{
		  $res .= "<option value=\"".$menue->id."\">".$menue->name."</option>";
		}
	  }
	  $res .= "</select>";
 	  return $res;
	}

  }
?>